package cn.seaboot.admin.quartz.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * POJO
 * 定时任务执行日志 [t_schedule_log]
 * @author Mr.css on 2018-6-20
 */
@Schema(description = "定时任务执行日志 [t_schedule_log] 实体类")
public class ScheduleLog implements Serializable {
    private static final long serialVersionUID = 3297264422091550591L;
    /**
     * ID
     */
    @Schema(description = "ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
     * 任务ID
     */
    @Schema(description = "任务ID")
    private Long jobId;
    /**
     * 日志类型
     */
    @Schema(description = "任务类型")
    private Integer jobType;
    /**
     * 日志等级
     */
    @Schema(description = "日志等级")
    private Integer logLevel;
    /**
     * 状态
     */
    @Schema(description = "状态")
    private Integer jobStatus;
    /**
     * 受影响行数
     */
    @Schema(description = "受影响行数")
    private Integer effectRows;
    /**
     * 简短的错误描述
     */
    @Schema(description = "简短的错误描述")
    private String errorMessage;
    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private LocalDateTime gmtStart;
    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    private LocalDateTime gmtEnd;
    /**
     * 创建日期
     */
    @Schema(description = "创建日期")
    private LocalDateTime gmtCreate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public Integer getJobType() {
        return jobType;
    }

    public void setJobType(Integer jobType) {
        this.jobType = jobType;
    }

    public Integer getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(Integer logLevel) {
        this.logLevel = logLevel;
    }

    public Integer getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(Integer jobStatus) {
        this.jobStatus = jobStatus;
    }

    public Integer getEffectRows() {
        return effectRows;
    }

    public void setEffectRows(Integer effectRows) {
        this.effectRows = effectRows;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public LocalDateTime getGmtStart() {
        return gmtStart;
    }

    public void setGmtStart(LocalDateTime gmtStart) {
        this.gmtStart = gmtStart;
    }

    public LocalDateTime getGmtEnd() {
        return gmtEnd;
    }

    public void setGmtEnd(LocalDateTime gmtEnd) {
        this.gmtEnd = gmtEnd;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    public String toString() {
        return "ScheduleLog{" +
                "id='" + id + '\'' +
                ", jobId='" + jobId + '\'' +
                ", jobType=" + jobType +
                ", logLevel=" + logLevel +
                ", jobStatus=" + jobStatus +
                ", effectRows=" + effectRows +
                ", errorMessage='" + errorMessage + '\'' +
                ", gmtStart=" + gmtStart +
                ", gmtEnd=" + gmtEnd +
                ", gmtCreate=" + gmtCreate +
                '}';
    }
}